# author: SA12226114(Xin Zhu) SA12226139(Dan Shu)
# set compile arguments

CC = gcc
CFLAGS = -g

# generate object file and execute file
vdb: main.o dbapi.o
	$(CC) $(CFLAGS) main.o dbapi.o -ltokyocabinet -o vdb
	@echo "====================================================================="
	@echo "=                        compile successfully                       ="
	@echo "====================================================================="

dbapi.o:
	$(CC) $(CFLAGS) -c dbapi.c -o dbapi.o

main.o: 
	$(CC) $(CFLAGS) -c main.c -o main.o


# clean rubbish
clean:
	rm -f *.o main dbapi vdb
	@echo "====================================================================="
	@echo "=                        clean successfully                         ="
	@echo "====================================================================="
